home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compendium Deluxe 2
/
LSD and 17bit Compendium Deluxe - Volume II.iso
/
a
/
prog
/
asmsrc
/
phagexsources.lha
/
source
/
FastCopVector2.s
< prev
next >
Wrap
Text File
|
1993-08-20
|
16KB
|
1,031 lines
Opt c-
Section "Base Code",Code_c
Piccy1 = $e0000
Piccy2 = $e4000
Start Movem.l d0-d7/a0-a6,-(sp)
Bsr KillSys
Lea CopperList(pc),a0
Lea HardWare,a6
Move.l a0,Cop1Lc(a6)
Move.w #$83c0,DMACon(a6)
Bsr DoVector
Loop Btst #6,$Bfe001
Bne Loop
Bsr ReturnSys
Movem.l (sp)+,d0-d7/a0-a6
Moveq #0,d0
Rts
CalcVector Lea ZRot(pc),a0
TryAgain Move.w (a0),d0
Btst #15,d0
Beq OnZero
Add.w #360,(a0)
Bra TryAgain
OnZero Cmp.w #359,(a0)
Ble NotOverZRot
Sub.w #360,(a0)
NotOverZRot Move.l ObjectPt(pc),a1
Lea PointsAm(pc),a5
Move.w (a1)+,(a5)
Lea VecSineTable(pc),a3
Lea RotPoints(pc),a4
Move.w ZRot(pc),d5
Moveq.l #9,d7
Add.w d5,d5
Lea SineVar1(pc),a5
Move.w 0(a3,d5.w),0(a5)
Add.w #$B4,d5
Move.w 0(a3,d5.w),2(a5)
VecType3 Move.w (a1)+,d0
Move.w (a1)+,d1
Asl.w #5,d0
Asl.w #5,d1
Moveq.l #0,d2
Move.w SineVar1(pc),d3
Move.w SineVar2(pc),d4
Move.w d3,d5
Move.w d4,d6
Muls d0,d4
Muls d1,d3
Sub.l d3,d4
Asr.l d7,d4
Muls d5,d0
Muls d6,d1
Add.l d0,d1
Asr.l d7,d1
Move.w d4,d0
Asr.w #4,d2
Asr.w #4,d0
Asr.w #4,d1
Move.w d2,a0
Moveq.l #9,d4
Ext.l d0
Lsl.l d4,d0
Add.w DistX(pc),d2
Add.w #$0200,d2
Divs d2,d0
Ext.l d1
Lsl.l d4,d1
Move.w a0,d2
Add.w DistY(pc),d2
Add.w #$0200,d2
Divs d2,d1
Add.w XPos(pc),d0
Add.w YPos(pc),d1
Move.w d0,(a4)+
Move.w d1,(a4)+
Lea PointsAm(pc),a5
Sub.w #1,(a5)
Bne VecType3
Rts
DoXYSine Lea DistX(pc),a4
Lea SineXPt(pc),a5
Bsr DoSine
Asr.w #1,d3
Move.w d3,(a4)
Lea DistY(pc),a4
Lea SineYPt(pc),a5
Bsr DoSine
Asr.w #1,d3
Move.w d3,(a4)
Lea DistX(pc),a4
And.w #4095,0(a4)
And.w #4095,2(a4)
;Move.w 0(a4),2(a4)
Rts
DoSine Lea SineData(pc),a6
Moveq #0,d2
Moveq #0,d3
Move.l 08(a5),d0
Move.l 12(a5),d1
Add.l d0,00(a5)
Add.l d1,04(a5)
And.l #$ffe,00(a5)
And.l #$ffe,04(a5)
Move.l 00(a5),d0
Move.l 04(a5),d1
Move.w (a6,d0.l),d2
Move.w (a6,d1.l),d3
Add.l d2,d3
Asl.w #3,d3
Add.w #4096,d3
Rts
WaitBlitter Btst #14,$2(a6)
Bne WaitBlitter
Rts
KillSys Bsr.s SysWait
Move.l $4,a6
Lea GFXName(pc),a1
Moveq #0,d0
Jsr -552(a6)
Lea OldCop1(pc),a5
Move.l $26(a0),$0(a5)
Move.l $32(a0),$4(a5)
Lea HardWare,a6
Move.w IntEnaR(a6),d0
Move.w DMAConR(a6),d1
Or.w #$8000,d0
And.w #$03ff,d1
Or.w #$8000,d1
Move.w d0,$8(a5)
Move.w d1,$a(a5)
Move.w #$7fff,IntEna(a6)
Move.w #$7fff,DMACon(a6)
Rts
SysWait Move.w #15,d7
SysWaitLoop Move.l #$05000,d1
Bsr.s WaitVBL
Bsr.s DoWaitVBL
Dbf d7,SysWaitLoop
Rts
DoWaitVBL Move.l #$03000,d1
WaitVBL Movem.l d0-d1/a6,-(sp)
Lea HardWare,a6
WaitVBLLoop Move.l VPosR(a6),d0
And.l #$1ff00,d0
Cmp.l d1,d0
Bne.s WaitVBLLoop
Movem.l (sp)+,d0-d1/a6
Rts
ReturnSys Lea HardWare,a6
Move.w OldIntEna(pc),IntEna(a6)
Move.w OldDMACon(pc),DMACon(a6)
Move.l OldCop1(pc),Cop1lc(a6)
Move.l OldCop2(pc),Cop2lc(a6)
Rts
SetNewObject Lea ObjectPt(pc),a1
Move.l a4,(a1)
Moveq #0,d0
Move.w (a4)+,d0
Asl.w #2,d0
Add.l d0,a4
Lea ConnectPtr(pc),a3
Move.l a4,(a3)
Rts
DoObject Lea RotPoints(pc),a4
Move.l ObjectPt(pc),a1
Lea XSize(pc),a2
Move.w (a1)+,d7
Sub.w #1,d7
Calculate Move.w (a1)+,d0
Move.w (a1)+,d1
And.w #2047,0(a2)
And.w #2047,2(a2)
Move.w 0(a2),d2
Move.w 2(a2),d3
Muls d2,d0
Muls d3,d1
Asr.l #8,d0
Asr.l #8,d1
Asr.l #1,d0
Asr.l #1,d1
Add.w #176,d0
Add.w #148,d1
Move.w d0,(a4)+
Move.w d1,(a4)+
Dbf d7,Calculate
Rts
DoVector Lea $Dff000,a6
Bsr BlitterWait
ClearPiccy1 Move.w #$01F0,$40(a6)
Move.w #0,$42(a6)
Move.w #$ffff,$44(a6)
Move.w #$ffff,$46(a6)
Move.w #0,$74(a6)
Move.l PiccyBase1(pc),$54(a6)
Move.w #0,$66(a6)
Move.w #$4AE0,$58(a6)
ClearPiccy2 Move.w #$01F0,$40(a6)
Move.w #0,$42(a6)
Move.w #$ffff,$44(a6)
Move.w #$ffff,$46(a6)
Move.w #0,$74(a6)
Move.l PiccyBase2(pc),$54(a6)
Move.w #0,$66(a6)
Move.w #$4AE0,$58(a6)
Bsr SetCopperLists
Bsr BlitterWait
Lea VectorData(pc),a4
Bsr SetNewObject
Lea $Dff000,a6
Move.w #$f,$2E(a6)
Lea CopperList1(pc),a0
Move.l a0,$Dff080
LoopX Bsr DoXYSine
Bsr CalcVector
Lea ZRot(pc),a5
Add.w #1,(a5)
Bsr VBL
Bsr DoDrawLines
Btst #6,$Bfe001
Bne LoopX
Rts
BlitterWait Btst #14,$2(a6)
Bne BlitterWait
Rts
DoDrawLines Lea VV(pc),a4
Bsr DoubleBuffer
Move.l ConnectPtr(pc),a1
Lea RotPoints(pc),a2
Lea EndRotPoints(pc),a3
Move.w (a1)+,d7
Subq #1,d7
DrawLineLoop Move.w (a1)+,d4
Move.w (a1)+,d5
Add.w d4,d4
Add.w d4,d4
Add.w d5,d5
Add.w d5,d5
Movem.w 0(a2,d4.w),d0/d1
Movem.w 0(a2,d5.w),d2/d3
Cmp.w d1,d3
Bpl.s CheckSameY
Exg d2,d0
Exg d3,d1
CheckSameY Cmp.w #0,d3
Bmi DoNextConnect
Cmp.w #$012B,d1
Bpl DoNextConnect
Cmp.w #0,d1
Bpl.s ClipVec1
Sub.w d2,d0
Sub.w d3,d1
Move.w d3,d4
Sub.w #0,d4
Muls d4,d0
Divs d1,d0
Sub.w d2,d0
Neg.w d0
Move.w #0,d1
Cmp.w #$015F,d0
Bpl.s ClipVec1
Bset #4,Flags-VV(a4)
Move.w d1,-(a3)
ClipVec1 Cmp.w #$012B,d3
Bmi.s ClipVec2
Move.w d2,d4
Sub.w d0,d2
Move.w d1,d5
Sub.w d3,d5
Sub.w #$012B,d3
Muls d3,d2
Divs d5,d2
Add.w d4,d2
Move.w #$012B,d3
Cmp.w #$015F,d2
Bpl.s ClipVec2
Bset #4,Flags-VV(a4)
Move.w d3,-(a3)
ClipVec2 Cmp.w #$015F,d0
Bpl.s ClipVec3
Cmp.w #0,d0
Bmi ClipVec4
Cmp.w #$015F,d2
Bpl ClipVec5
Cmp.w #0,d2
Bmi SetCopperData
Bra CopperLine1
ClipVec3 Cmp.w #$015F,d2
Bpl DoNextConnect1
Sub.w d3,d1
Sub.w d2,d0
Move.w d2,d4
Sub.w #$015F,d4
Muls d4,d1
Divs d0,d1
Sub.w d3,d1
Neg.w d1
Move.w #$015F,d0
Bset #2,Flags-VV(a4)
Move.w d1,-(a3)
Cmp.w #0,d2
Bmi SetCopperData
Bra.s CopperLine1
ClipVec4 Cmp.w #0,d2
Bmi DoNextConnect
Sub.w d3,d1
Move.w d2,d4
Sub.w #0,d4
Sub.w d2,d0
Muls d4,d1
Divs d0,d1
Sub.w d3,d1
Neg.w d1
Move.w #0,d0
Cmp.w #$015F,d2
Bpl ClipVec5
Bra.s CopperLine1
ClipVec5 Move.w d3,d6
Sub.w d1,d3
Move.w d0,d5
Sub.w d2,d5
Sub.w #$015F,d2
Muls d2,d3
Divs d5,d3
Add.w d6,d3
Move.w #$015F,d2
Bset #2,Flags-VV(a4)
Move.w d3,-(a3)
Bra.s CopperLine1
SetCopperData Move.w d3,d6
Sub.w d1,d3
Move.w d0,d5
Sub.w d2,d5
Sub.w #0,d2
Muls d2,d3
Divs d5,d3
Add.w d6,d3
Move.w #0,d2
CopperLine1 Cmp.w d1,d3
Beq DoNextConnect
Addq.w #1,d1
Move.l #$10000,(a5)+
Move.w d0,d5
Move.w d1,d4
Muls #$2C,d4
Asr.w #3,d5
Add.w d5,d4
Add.l a6,d4
Move.w #$4A,(a5)+
Move.w d4,(a5)+
Move.w #$56,(a5)+
Move.w d4,(a5)+
Swap d4
Move.w #$48,(a5)+
Move.w d4,(a5)+
Move.w #$54,(a5)+
Move.w d4,(a5)+
Move.w d0,d5
And.w #15,d5
Ror.w #4,d5
Add.w #$0B4A,d5
Move.w #$40,(a5)+
Move.w d5,(a5)+
Moveq.l #0,d4
Sub.w d2,d0
Bpl.s CalcCop1
Neg.w d0
Or.b #1,d4
CalcCop1 Sub.w d3,d1
Bpl.s CalcCop2
Neg.w d1
Or.b #2,d4
CalcCop2 Cmp.w d0,d1
Bmi.s CheckOctants
Or.b #4,d4
Exg d0,d1
CheckOctants Move.b Octants(pc,d4.w),d4
Add.w d1,d1
Move.w #$62,(a5)+
Move.w d1,(a5)+
Sub.w d0,d1
Bpl.s SetDataInCop
Bset #6,d4
SetDataInCop Move.w #$42,(a5)+
Move.w d4,(a5)+
Move.w #$52,(a5)+
Move.w d1,(a5)+
Move.w d1,d3
Sub.w d0,d1
Move.w #$64,(a5)+
Move.w d1,(a5)+
Lsl.w #6,d0
Add.w #$42,d0
Move.w #$58,(a5)+
Move.w d0,(a5)+
Bra.s DoNextConnect
Octants Dc.l $1F1B1713
Dc.l $0F070B03
DoNextConnect Dbra d7,DrawLineLoop
Bra.s FinalCopCalc
DoNextConnect1 Bset #3,Flags-VV(a4)
Dbra d7,DrawLineLoop
FinalCopCalc Btst #2,Flags-VV(a4)
Beq.s CopDataPlace
Lea EndRotPoints(pc),a0
Cmp.l a0,a3
Bne.s CopDataPlace
Btst #3,Flags-VV(a4)
Bne EndCoordData
CopDataPlace Btst #4,Flags-VV(a4)
Beq CheckEndData
Btst #3,Flags-VV(a4)
Beq CheckEndData
Lea EndRotPoints(pc),a0
Cmp.l a0,a3
Bne CheckEndData
Move.w #$015F,d0
Move.w #0,d1
Move.w d0,d2
Move.w #$012B,d3
Addq.w #1,d1
Move.l #$10000,(a5)+
Move.w d0,d5
Move.w d1,d4
Muls #$2C,d4
Asr.w #3,d5
Add.w d5,d4
Add.l a6,d4
Move.w #$4A,(a5)+
Move.w d4,(a5)+
Move.w #$56,(a5)+
Move.w d4,(a5)+
Swap d4
Move.w #$48,(a5)+
Move.w d4,(a5)+
Move.w #$54,(a5)+
Move.w d4,(a5)+
Move.w d0,d5
And.w #15,d5
Ror.w #4,d5
Add.w #$0B4A,d5
Move.w #$40,(a5)+
Move.w d5,(a5)+
Moveq.l #0,d4
Sub.w d2,d0
Bpl.s CalcCop1a
Neg.w d0
Or.b #1,d4
CalcCop1a Sub.w d3,d1
Bpl.s CalcCop2a
Neg.w d1
Or.b #2,d4
CalcCop2a Cmp.w d0,d1
Bmi.s CheckOctants1a
Or.b #4,d4
Exg d0,d1
CheckOctants1a Move.b Octants1a(pc,d4.w),d4
Add.w d1,d1
Move.w #$62,(a5)+
Move.w d1,(a5)+
Sub.w d0,d1
Bpl.s NoSet6Flag
Bset #6,d4
NoSet6Flag Move.w #$42,(a5)+
Move.w d4,(a5)+
Move.w #$52,(a5)+
Move.w d1,(a5)+
Move.w d1,d3
Sub.w d0,d1
Move.w #$64,(a5)+
Move.w d1,(a5)+
Lsl.w #6,d0
Add.w #$42,d0
Move.w #$58,(a5)+
Move.w d0,(a5)+
Bra.s CalcTheCopSet
Octants1a Dc.l $1F1B1713
Dc.l $0F070B03
CalcTheCopSet Bra EndCoordData
CheckEndData Lea EndRotPoints(pc),a0
Cmp.l a0,a3
Bpl EndCoordData
Movem.w (a3)+,d1/d3
Cmp.w d1,d3
Beq DoCheckData
Move.w #$015F,d0
Move.w d0,d2
Cmp.w d1,d3
Bpl.s CheckYLine1
Exg d2,d0
Exg d3,d1
CheckYLine1 Addq.w #1,d1
Move.l #$10000,(a5)+
Move.w d0,d5
Move.w d1,d4
Muls #$2C,d4
Asr.w #3,d5
Add.w d5,d4
Add.l a6,d4
Move.w #$4A,(a5)+
Move.w d4,(a5)+
Move.w #$56,(a5)+
Move.w d4,(a5)+
Swap d4
Move.w #$48,(a5)+
Move.w d4,(a5)+
Move.w #$54,(a5)+
Move.w d4,(a5)+
Move.w d0,d5
And.w #15,d5
Ror.w #4,d5
Add.w #$0B4A,d5
Move.w #$40,(a5)+
Move.w d5,(a5)+
Moveq.l #0,d4
Sub.w d2,d0
Bpl.s CalVars1
Neg.w d0
Or.b #1,d4
CalVars1 Sub.w d3,d1
Bpl.s CalVars2
Neg.w d1
Or.b #2,d4
CalVars2 Cmp.w d0,d1
Bmi.s CheckOctants1b
Or.b #4,d4
Exg d0,d1
CheckOctants1b Move.b Octants1b(pc,d4.w),d4
Add.w d1,d1
Move.w #$62,(a5)+
Move.w d1,(a5)+
Sub.w d0,d1
Bpl.s SetCopper1a
Bset #6,d4
SetCopper1a Move.w #$42,(a5)+
Move.w d4,(a5)+
Move.w #$52,(a5)+
Move.w d1,(a5)+
Move.w d1,d3
Sub.w d0,d1
Move.w #$64,(a5)+
Move.w d1,(a5)+
Lsl.w #6,d0
Add.w #$42,d0
Move.w #$58,(a5)+
Move.w d0,(a5)+
Bra.s DoCheckData
Octants1b Dc.l $1F1B1713
Dc.l $0F070B03
DoCheckData Bra CheckEndData
EndCoordData Bclr #2,Flags-VV(a4)
Bclr #3,Flags-VV(a4)
Bclr #4,Flags-VV(a4)
Move.l a6,d0
Add.l #$0338E,d0
Move.l #$10000,(a5)+
Move.l #$4009F0,(a5)+
Move.l #$42001A,(a5)+
Move.l #$640001,(a5)+
Move.l #$660001,(a5)+
Move.l #$44FFFF,(a5)+
Move.l #$46FFFF,(a5)+
Move.w #$52,(a5)+
Move.w d0,(a5)+
Move.w #$56,(a5)+
Move.w d0,(a5)+
Swap d0
Move.w #$50,(a5)+
Move.w d0,(a5)+
Move.w #$54,(a5)+
Move.w d0,(a5)+
Move.l #$584AD6,(a5)+
Move.l #$ffffFFFE,(a5)+
Rts
VBL Move.l $Dff004,d0
And.l #$01FF00,d0
Cmp.l #$012400,d0
Bne.s VBL
Rts
SetCopperLists Move.l #Piccy1,d0
Move.l #Piccy2,d1
Lea CopperList1(pc),a0
Lea CopperList2(pc),a1
Lea CopperBlitBPLS1(pc),a2
Lea CopperBlitBPLS2(pc),a3
Move.w d0,6(a1)
Move.w d0,6(a2)
Move.w d1,6(a0)
Move.w d1,6(a3)
Swap d0
Swap d1
Move.w d0,2(a1)
Move.w d0,2(a2)
Move.w d1,2(a0)
Move.w d1,2(a3)
Rts
DoubleBuffer Bchg #0,Flags-VV(a4)
Btst #0,Flags-VV(a4)
Bne DBuffer1
Move.l PiccyBase1(pc),a6
Lea CopperList1(pc),a0
Move.l a0,$Dff080
Lea CopBlit1(pc),a5
Rts
DBuffer1 Move.l PiccyBase2(pc),a6
Lea CopperList2(pc),a0
Move.l a0,$Dff080
Lea CopBlit2(pc),a5
Rts
GFXName Dc.b "graphics.library",0
Even
OldCop1 Dc.l 0
OldCop2 Dc.l 0
OldIntEna Dc.w 0
OldDmaCon Dc.w 0
Screen Dc.l $c0000
PiccyBase1 Dc.l $e0000
PiccyBase2 Dc.l $e4000
VV ; Var Pointer (pc)
SineVar1 Dc.w 0
SineVar2 Dc.w 0
SineVar3 Dc.w 0
SineVar4 Dc.w 0
SineVar5 Dc.w 0
SineVar6 Dc.w 0
XRot Dc.w 10
YRot Dc.w 10
ZRot Dc.w 10
PointsAm Dc.w 0
DistX Dc.w 500
DistY Dc.w 500
TempDist Dc.w 0
XPos Dc.w 176
YPos Dc.w 148
SineXPt Dc.l 0
SineXPt1 Dc.l 0
SineXAdd Dc.l 70
SineXAdd1 Dc.l 54
SineYPt Dc.l 0
SineYPt1 Dc.l 0
SineYAdd Dc.l 66
SineYAdd1 Dc.l 44
ObjectPt Dc.l 0
XSize Dc.w 0
YSize Dc.w 0
MiscVar1 Dc.w 0
MiscVar2 Dc.w $07d0
MiscVar3 Dc.w 10
MiscVar4 Dc.w 0
MiscVar5 Dc.w 0
MiscVar6 Dc.w 1
MiscVar7 Dc.w $f441
MiscVar8 Dc.w $09e7
Dc.w 2
Dc.w $7bd6
MiscPtr1 Dc.l 0
ConnectPtr Dc.l 0
MiscVar9 Dc.w $49
DrawX Dc.w $4
DrawVar1 Dc.w $fffc
DrawVar2 Dc.w $3
DrawVar3 Dc.w $1
DrawVar4 Dc.w $1
FrameWait Dc.w $18
VecType Dc.w 14
StatVar Dc.w 0
Flags Dc.w 0
Flags1 Dc.w 0
Flags2 Dc.w $49
Flags3 Dc.w $4d
Flags4 Dc.w $36
Flags5 Dc.w $4b
RotPoints Dc.w 30,40
Dc.w 40,60
Dc.w 60,60
Dc.w 60,40
Ds.w 600
EndRotPoints Dc.w 0
Connects Dc.w 4
Dc.w 0,1
Dc.w 1,2
Dc.w 2,3
Dc.w 3,0
Cmv Macro
Dc.w \2,\1
EndM
Cwt Macro
Dc.w (\1*$100)+$01,$fffe
EndM
CwtBlit Macro
Dc.w $1,0
EndM
Pal Macro
Dc.w $ffe1,$fffe
EndM
EndCop Macro
Dc.w $ffff,$fffe
EndM
CopperList Cwt $15
Cmv $0200,BplCon0
Cmv $00bb,BplCon1
Cmv $000a,BplCon2
Cmv $1681,DiwStrt
Cmv $36c1,DiwStop
Cmv $0034,DdfStrt
Cmv $00c8,DdfStop
Cmv $0,BplMod1
Cmv $0,BplMod2
Cwt $25
Cmv $0000,Color01
Cmv $0fff,Color01
CopperBPLS Cmv $c,BplPt0h
Cmv $0,BplPt0l
Cmv $0,BplPt1h
Cmv $0,BplPt1l
Cmv $0,BplPt2h
Cmv $0,BplPt2l
Cmv $0,BplPt3h
Cmv $0,BplPt3l
Cmv $0,BplPt4h
Cmv $0,BplPt4l
Cwt $28
Cmv $1200,BplCon0
EndCop
CopperList1 Cmv $0,BplPt0h
Cmv $0,BplPt0l
Cmv $0c71,DiwStrt
Cmv $37d1,DiwStop
Cmv $0030,DdfStrt
Cmv $00d8,DdfStop
Cmv $1200,BplCon0
Cmv $0000,BplCon1
Cmv $0024,BplCon2
Cmv $0,BplMod1
Cmv $0,BplMod2
Cmv $0000,Color01
Cmv $0fff,Color01
CwtBlit
Cmv $01f0,BltCon0
Cmv $0000,BltCon1
Cmv $ffff,BltAFWM
Cmv $ffff,BltALWM
Cmv $0000,BltADat
CopperBlitBPLS1 Cmv $0000,BltDPth
Cmv $0000,BltDPtl
Cmv $0000,BltDMod
Cmv $4ad6,BltSize
CwtBlit
Cmv $002c,BltCMod
Cmv $002c,BltDMod
Cmv $ffff,BltBDat
Cmv $8000,BltADat
CopBlit1 EndCop
Ds.l $420
CopperList2 Cmv $0,BplPt0h
Cmv $0,BplPt0l
Cmv $0c71,DiwStrt
Cmv $37d1,DiwStop
Cmv $0030,DdfStrt
Cmv $00d8,DdfStop
Cmv $1200,BplCon0
Cmv $0000,BplCon1
Cmv $0024,BplCon2
Cmv $0,BplMod1
Cmv $0,BplMod2
Cmv $0000,Color01
Cmv $0fff,Color01
CwtBlit
Cmv $01f0,BltCon0
Cmv $0000,BltCon1
Cmv $ffff,BltAFWM
Cmv $ffff,BltALWM
Cmv $0000,BltADat
CopperBlitBPLS2 Cmv $0000,BltDPth
Cmv $0000,BltDPtl
Cmv $0000,BltDMod
Cmv $4ad6,BltSize
CwtBlit
Cmv $002c,BltCMod
Cmv $002c,BltDMod
Cmv $ffff,BltBDat
Cmv $8000,BltADat
CopBlit2 EndCop
Ds.l $420
VectorData Incbin Df1:SysData/ATX-Vek.DAT
SineData Incbin Df1:SysData/Sine1024Bs.Dat
Incbin Df1:SysData/Sine1024Bs.Dat
VecSineTable Incbin Df1:SysData/VecSine.Data
****Custom Chip Registers****
Hardware = $Dff000
;Control Registers
Dmaconr = $002
Vposr = $004
Vhposr = $006
Joy0dat = $00A
Joy1dat = $00C
Clxdat = $00E
Intenar = $01C
Intereqr = $01E
Copcon = $02E
;Blitter Registers
Bltcon0 = $040
Bltcon1 = $042
Bltafwm = $044
Bltalwm = $046
Bltcpth = $048
Bltcptl = $04A
Bltbpth = $04C
Bltbptl = $04E
Bltapth = $050
Bltaptl = $052
Bltdpth = $054
Bltdptl = $056
Bltsize = $058
Bltcmod = $060
Bltbmod = $062
Bltamod = $064
Bltdmod = $066
Bltcdat = $070
Bltbdat = $072
Bltadat = $074
;Copper Registers
Cop1lc = $080
Cop1lch = $080
Cop1lcl = $082
Cop2lc = $084
Cop2lch = $084
Cop2lcl = $086
Copjmp1 = $088
Copjmp2 = $08A
Diwstrt = $08E
Diwstop = $090
Ddfstrt = $092
Ddfstop = $094
Dmacon = $096
Clxcon = $098
Intena = $09A
Intreq = $09C
;BitPlane Registers
BplCon0 = $100
BplCon1 = $102
BplCon2 = $104
BplMod1 = $108
BplMod2 = $10a
BplPt0h = $0e0
BplPt0l = $0e2
BplPt1h = $0e4
BplPt1l = $0e6
BplPt2h = $0e8
BplPt2l = $0ea
BplPt3h = $0ec
BplPt3l = $0ee
BplPt4h = $0f0
BplPt4l = $0f2
BplPt5h = $0f4
BplPt5l = $0f6
;Colour Registers
Color00 = $180
Color01 = $182
Color02 = $184
Color03 = $186
Color04 = $188
Color05 = $18a
Color06 = $18c
Color07 = $18e
Color08 = $190
Color09 = $192
Color10 = $194
Color11 = $196
Color12 = $198
Color13 = $19a
Color14 = $19c
Color15 = $19e
Color16 = $1a0
Color17 = $1a2
Color18 = $1a4
Color19 = $1a6
Color20 = $1a8
Color21 = $1aa
Color22 = $1ac
Color23 = $1ae
Color24 = $1b0
Color25 = $1b2
Color26 = $1b4
Color27 = $1b6
Color28 = $1b8
Color29 = $1ba
Color30 = $1bc
Color31 = $1be
EcsNop = $1fe